home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 1
/
Nebula One.iso
/
Utilities
/
Unix
/
nvi-1.61-alpha
/
man
/
nvi.1
Wrap
Text File
|
1996-04-16
|
43KB
|
814 lines
EX/VI(1) BSD Reference Manual EX/VI(1)
NNAAMMEE
eexx,, vvii,, vviieeww - text editors
SSYYNNOOPPSSIISS
eexx [--eeFFRRrrssvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [_f_i_l_e _._._.]
vvii [--eeFFllRRrrvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [_f_i_l_e _._._.]
vviieeww [--eeFFRRrrvv] [--cc _c_m_d] [--tt _t_a_g] [--ww _s_i_z_e] [_f_i_l_e _._._.]
DDEESSCCRRIIPPTTIIOONN
VVii is a screen oriented text editor. EExx is a line-oriented text editor.
EExx and vvii are different interfaces to the same program, and it is possi-
ble to switch back and forth during an edit session. VViieeww is the equiva-
lent of using the --RR (read-only) option of vvii.
This manual page is the one provided with the nneexx//nnvvii versions of the
eexx//vvii text editors. NNeexx//nnvvii are intended as bug-for-bug compatible re-
placements for the original Fourth Berkeley Software Distribution (4BSD)
eexx and vvii programs. For the rest of this manual page, nneexx//nnvvii is used
only when it's necessary to distinguish it from the historic implementa-
tions of eexx//vvii.
This manual page is intended for users already familiar with eexx//vvii. Any-
one else should almost certainly read a good tutorial on the editor be-
fore this manual page. If you're in an unfamiliar environment, and you
absolutely have to get work done immediately, read the section after the
options description, entitled ``Fast Startup''. It's probably enough to
get you going.
The following options are available:
--cc Execute _c_m_d immediately after starting the edit session. Partic-
ularly useful for initial positioning in the file, however _c_m_d is
not limited to positioning commands. This is the POSIX 1003.2
interface for the historic ``+cmd'' syntax. NNeexx//nnvvii supports
both the old and new syntax.
--ee Start editing in ex mode, as if the command name were eexx.
--FF Don't copy the entire file when first starting to edit. (The de-
fault is to make a copy in case someone else modifies the file
during your edit session.)
--ll Start editing with the lisp and showmatch options set.
--RR Start editing in read-only mode, as if the command name was vviieeww,
or the readonly option was set.
--rr Recover the specified files, or, if no files are specified, list
the files that could be recovered. If no recoverable files by
the specified name exist, the file is edited as if the --rr option
had not been specified.
--ss Enter batch mode; applicable only to eexx edit sessions. Batch
mode is useful when running eexx scripts. Prompts, informative
messages and other user oriented message are turned off, and no
startup files or environmental variables are read. This is the
POSIX 1003.2 interface for the historic ``-'' argument. NNeexx//nnvvii
supports both the old and new syntax.
--tt Start editing at the specified tag. (See ctags(1)).
--ww Set the initial window size to the specified number of lines.
--vv Start editing in vi mode, as if the command name was vvii or vviieeww.
--XX Reserved for X11 interfaces. _N_o _X_1_1 _s_u_p_p_o_r_t _i_s _c_u_r_r_e_n_t_l_y
_i_m_p_l_e_m_e_n_t_e_d_.
Command input for eexx//vvii is read from the standard input. In the vvii in-
terface, it is an error if standard input is not a terminal. In the eexx
interface, if standard input is not a terminal, eexx will read commands
from it regardless, however, the session will be a batch mode session,
exactly as if the --ss option had been specified.
EExx//vvii exits 0 on success, and greater than 0 if an error occurs.
FFAASSTT SSTTAARRTTUUPP
This section will tell you the minimum amount that you need to do simple
editing tasks using vvii. If you've never used any screen editor before,
you're likely to have problems even with this simple introduction. In
that case you should find someone that already knows vvii and have them
walk you through this section.
VVii is a screen editor. This means that it takes up almost the entire
screen, displaying part of the file on each screen line, except for the
last line of the screen. The last line of the screen is used for you to
give commands to vvii, and for vvii to give information to you.
The other fact that you need to understand is that vvii is a modeful edi-
tor, i.e. you are either entering text or you are executing commands, and
you have to be in the right mode to do one or the other. You will be in
command mode when you first start editing a file. There are commands
that switch you into input mode. There is only one key that takes you
out of input mode, and that is the <escape> key. (Key names are written
using less-than and greater-than signs, e.g. <escape> means the
``escape'' key, usually labeled ``esc'' on your terminal's keyboard.) If
you're ever confused as to which mode you're in, keep entering the <es-
cape> key until vvii beeps at you. (Generally, vvii will beep at you if you
try and do something that's not allowed. It will also display error mes-
sages.)
To start editing a file, enter the command ``vi file_name<carriage-
return>''. The command you should enter as soon as you start editing is
``:set verbose showmode<carriage-return>''. This will make the editor
give you verbose error messages and display the current mode at the bot-
tom of the screen.
The commands to move around the file are:
hh Move the cursor left one character.
jj Move the cursor down one line.
kk Move the cursor up one line.
ll Move the cursor right one character.
<<ccuurrssoorr--aarrrroowwss>>
The cursor arrow keys should work, too.
//tteexxtt<<ccaarrrriiaaggee--rreettuurrnn>>
Search for the string ``text'' in the file, and move the cursor to
its first character.
The commands to enter new text are:
aa Append new text, _a_f_t_e_r the cursor.
ii Insert new text, _b_e_f_o_r_e the cursor.
oo Open a new line below the line the cursor is on, and start entering
text.
OO Open a new line above the line the cursor is on, and start entering
text.
<<eessccaappee>>
Once you've entered input mode using the one of the aa, ii, OO, or oo
commands, use <<eessccaappee>> to quit entering text and return to command
mode.
The commands to copy text are:
yyyy Copy the line the cursor is on.
pp Append the copied line after the line the cursor is on.
The commands to delete text are:
dddd Delete the line the cursor is on.
xx Delete the character the cursor is on.
The commands to write the file are:
::ww<<ccaarrrriiaaggee--rreettuurrnn>>
Write the file back to the file with the name that you originally
used as an argument on the vvii command line.
::ww ffiillee__nnaammee<<ccaarrrriiaaggee--rreettuurrnn>>
Write the file back to the file with the name ``file_name''.
The commands to quit editing and exit the editor are:
::qq<<ccaarrrriiaaggee--rreettuurrnn>>
Quit editing and leave vi (if you've modified the file, but not
saved your changes, vvii will refuse to quit).
::qq!!<<ccaarrrriiaaggee--rreettuurrnn>>
Quit, discarding any modifications that you may have made.
One final caution. Unusual characters can take up more than one column
on the screen, and long lines can take up more than a single screen line.
The above commands work on ``physical'' characters and lines, i.e. they
affect the entire line no matter how many screen lines it takes up and
the entire character no matter how many screen columns it takes up.
VVII CCOOMMMMAANNDDSS
The following section describes the commands available in the command
mode of the vvii editor. In each entry below, the tag line is a usage syn-
opsis for the command character.
[[ccoouunntt]] <<ccoonnttrrooll--AA>>
Search forward count times for the current word.
[[ccoouunntt]] <<ccoonnttrrooll--BB>>
Page backwards count screens.
[[ccoouunntt]] <<ccoonnttrrooll--DD>>
Scroll forward count lines.
[[ccoouunntt]] <<ccoonnttrrooll--EE>>
Scroll forward count lines, leaving the current line and column as
is, if possible.
[[ccoouunntt]] <<ccoonnttrrooll--FF>>
Page forward count screens.
<<ccoonnttrrooll--GG>>
Display the file information.
<<ccoonnttrrooll--HH>>
[[ccoouunntt]] hh
Move the cursor back count characters in the current line.
[[ccoouunntt]] <<ccoonnttrrooll--JJ>>
[[ccoouunntt]] <<ccoonnttrrooll--NN>>
[[ccoouunntt]] jj
Move the cursor down count lines without changing the current col-
umn.
<<ccoonnttrrooll--LL>>
<<ccoonnttrrooll--RR>>
Repaint the screen.
[[ccoouunntt]] <<ccoonnttrrooll--MM>>
[[ccoouunntt]] ++
Move the cursor down count lines to the first nonblank character of
that line.
[[ccoouunntt]] <<ccoonnttrrooll--PP>>
[[ccoouunntt]] kk
Move the cursor up count lines, without changing the current col-
umn.
<<ccoonnttrrooll--TT>>
Return to the most recent tag context.
<<ccoonnttrrooll--UU>>
Scroll backwards count lines.
<<ccoonnttrrooll--WW>>
Switch to the next lower screen in the window, or, to the first
screen if there are no lower screens in the window.
<<ccoonnttrrooll--YY>>
Scroll backwards count lines, leaving the current line and column
as is, if possible.
<<ccoonnttrrooll--ZZ>>
Suspend the current editor session.
<<eessccaappee>>
Execute eexx commands or cancel partial commands.
<<ccoonnttrrooll--]]>>
Push a tag reference onto the tag stack.
<<ccoonnttrrooll--^^>>
Switch to the most recently edited file.
[[ccoouunntt]] <<ssppaaccee>>
[[ccoouunntt]] ll
Move the cursor forward count characters without changing the cur-
rent line.
[[ccoouunntt]] !! mmoottiioonn sshheellll--aarrgguummeenntt((ss))
Replace text with results from a shell command.
[[ccoouunntt]] ## ##||++||--
Increment or decrement the cursor number.
[[ccoouunntt]] $$
Move the cursor to the end of a line.
%% Move to the matching character.
&& Repeat the previous substitution command on the current line.
''<<cchhaarraacctteerr>>
``<<cchhaarraacctteerr>>
Return to a context marked by the character <character>.
[[ccoouunntt]] ((
Back up count sentences.
[[ccoouunntt]] ))
Move forward count sentences.
[[ccoouunntt]] ,,
Reverse find character count times.
[[ccoouunntt]] --
Move to first nonblank of the previous line, count times.
[[ccoouunntt]] ..
Repeat the last vvii command that modified text.
//RREE<<ccaarrrriiaaggee--rreettuurrnn>>
//RREE// [[ooffffsseett]]<<ccaarrrriiaaggee--rreettuurrnn>>
??RREE<<ccaarrrriiaaggee--rreettuurrnn>>
??RREE?? [[ooffffsseett]]<<ccaarrrriiaaggee--rreettuurrnn>>
NN
nn Search forward or backward for a regular expression.
00 Move to the first character in the current line.
: Execute an ex command.
[[ccoouunntt]] ;;
Repeat the last character find count times.
[[ccoouunntt]] << mmoottiioonn
[[ccoouunntt]] >> mmoottiioonn
Shift lines left or right.
@@ bbuuffffeerr
Execute a named buffer.
[[ccoouunntt]] AA
Enter input mode, appending the text after the end of the line.
[[ccoouunntt]] BB
Move backwards count bigwords.
[[bbuuffffeerr]] [[ccoouunntt]] CC
Change text from the current position to the end-of-line.
[[bbuuffffeerr]] DD
Delete text from the current position to the end-of-line.
[[ccoouunntt]] EE
Move forward count end-of-bigwords.
[[ccoouunntt]] FF <<cchhaarraacctteerr>>
Search count times backward through the current line for
<character>.
[[ccoouunntt]] GG
Move to line count, or the last line of the file if count not spec-
ified.
[[ccoouunntt]] HH
Move to the screen line count - 1 lines below the top of the
screen.
[[ccoouunntt]] II
Enter input mode, inserting the text at the beginning of the line.
[[ccoouunntt]] JJ
Join lines.
[[ccoouunntt]] LL
Move to the screen line count - 1 lines above the bottom of the
screen.
MM Move to the screen line in the middle of the screen.
[[ccoouunntt]] OO
Enter input mode, appending text in a new line above the current
line.
[[bbuuffffeerr]] PP
Insert text from a buffer.
QQ Exit vvii (or visual) mode and switch to eexx mode.
[[ccoouunntt]] RR
Enter input mode, replacing the characters in the current line.
[[bbuuffffeerr]] [[ccoouunntt]] SS
Substitute count lines.
[[ccoouunntt]] TT <<cchhaarraacctteerr>>
Search backwards, count times, through the current line for the
character _a_f_t_e_r the specified <character>.
UU Restore the current line to its state before the cursor last moved
to it.
[[ccoouunntt]] WW
Move forward count bigwords.
[[bbuuffffeerr]] [[ccoouunntt]] XX
Delete count characters before the cursor.
[[bbuuffffeerr]] [[ccoouunntt]] YY
Copy (or ``yank'') count lines into the specified buffer.
ZZZZ Write the file and exit vvii.
[[ccoouunntt]] [[[[
Back up count section boundaries.
[[ccoouunntt]] ]]]]
Move forward count section boundaries.
^^ Move to first nonblank character on the current line.
[[ccoouunntt]] __
Move down count - 1 lines, to the first nonblank character.
[[ccoouunntt]] aa
Enter input mode, appending the text after the cursor.
[[ccoouunntt]] bb
Move backwards count words.
[[bbuuffffeerr]] [[ccoouunntt]] cc mmoottiioonn
Change a region of text.
[[bbuuffffeerr]] [[ccoouunntt]] dd mmoottiioonn
Delete a region of text.
[[ccoouunntt]] ee
Move forward count end-of-words.
[[ccoouunntt]] ff<<cchhaarraacctteerr>>
Search forward, count times, through the rest of the current line
for <character>.
[[ccoouunntt]] ii
Enter input mode, inserting the text before the cursor.
mm <<cchhaarraacctteerr>>
Save the current context (line and column) as <character>.
[[ccoouunntt]] oo
Enter input mode, appending text in a new line under the current
line.
[[bbuuffffeerr]] pp
Append text from a buffer.
[[ccoouunntt]] rr <<cchhaarraacctteerr>>
Replace count characters.
[[bbuuffffeerr]] [[ccoouunntt]] ss
Substitute count characters in the current line starting with the
current character.
[[ccoouunntt]] tt <<cchhaarraacctteerr>>
Search forward, count times, through the current line for the char-
acter immediately _b_e_f_o_r_e <character>.
uu Undo the last change made to the file.
[[ccoouunntt]] ww
Move forward count words.
[[bbuuffffeerr]] [[ccoouunntt]] xx
Delete count characters.
[[bbuuffffeerr]] [[ccoouunntt]] yy mmoottiioonn
Copy (or ``yank'') a text region specified by the count and motion
into a buffer.
[[ccoouunntt11]] zz [[ccoouunntt22]] --||..||++||^^||<<ccaarrrriiaaggee--rreettuurrnn>>
Redraw, optionally repositioning and resizing the screen.
[[ccoouunntt]] {{
Move backward count paragraphs.
[[ccoouunntt]] ||
Move to a specific _c_o_l_u_m_n position on the current line.
[[ccoouunntt]] }}
Move forward count paragraphs.
[[ccoouunntt]] ~~
Reverse the case of the next count character(s).
[[ccoouunntt]] ~~ mmoottiioonn
Reverse the case of the characters in a text region specified by
the count and motion.
<<iinntteerrrruupptt>>
Interrupt the current operation.
VVII TTEEXXTT IINNPPUUTT CCOOMMMMAANNDDSS
The following section describes the commands available in the text input
mode of the vvii editor.
<<nnuull>>
Replay the previous input.
<<ccoonnttrrooll--DD>>
Erase to the previous sshhiiffttwwiiddtthh column boundary.
^^<<ccoonnttrrooll--DD>>
Erase all of the autoindent characters, and reset the autoindent
level.
00<<ccoonnttrrooll--DD>>
Erase all of the autoindent characters.
<<ccoonnttrrooll--TT>>
Insert sufficient <tab> and <space> characters to move forward to
the next sshhiiffttwwiiddtthh column boundary.
<<eerraassee>>
<<ccoonnttrrooll--HH>>
Erase the last character.
<<lliitteerraall nneexxtt>>
Quote the next character.
<<eessccaappee>>
Resolve all text input into the file, and return to command mode.
<<lliinnee eerraassee>>
Erase the current line.
<<ccoonnttrrooll--WW>>
<<wwoorrdd eerraassee>>
Erase the last word. The definition of word is dependent on the
aallttwweerraassee and ttttyywweerraassee options.
<<ccoonnttrrooll--XX>>[[00--99AA--FFaa--ff]]++
Insert a character with the specified hexadecimal value into the
text.
<<iinntteerrrruupptt>>
Interrupt text input mode, returning to command mode.
EEXX CCOOMMMMAANNDDSS
The following section describes the commands available in the eexx editor.
In each entry below, the tag line is a usage synopsis for the command.
<<eenndd--ooff--ffiillee>>
Scroll the screen.
!! aarrgguummeenntt((ss))
[[rraannggee]]!! aarrgguummeenntt((ss))
Execute a shell command, or filter lines through a shell command.
"" A comment.
[[rraannggee]] nnuu[[mmbbeerr]] [[ccoouunntt]] [[ffllaaggss]]
[[rraannggee]] ## [[ccoouunntt]] [[ffllaaggss]]
Display the selected lines, each preceded with its line number.
@@ bbuuffffeerr
** bbuuffffeerr
Execute a buffer.
[[rraannggee]] dd[[eelleettee]] [[bbuuffffeerr]] [[ccoouunntt]] [[ffllaaggss]]
Delete the lines from the file.
ddii[[ssppllaayy]] bb[[uuffffeerrss]] || ss[[ccrreeeennss]] || tt[[aaggss]]
Display buffers, screens or tags.
ee[[ddiitt]][[!!]] [[++ccmmdd]] [[ffiillee]]
eexx[[!!]] [[++ccmmdd]] [[ffiillee]]
Edit a different file.
eexxuu[[ssaaggee]] [[ccoommmmaanndd]]
Display usage for an eexx command.
ff[[iillee]] [[ffiillee]]
Display and optionally change the file name.
ffgg [[nnaammee]]
VVii mode only. Foreground the specified screen.
[[rraannggee]] gg[[lloobbaall]] //ppaatttteerrnn// [[ccoommmmaannddss]]
[[rraannggee]] vv //ppaatttteerrnn// [[ccoommmmaannddss]]
Apply commands to lines matching (or not matching) a pattern.
hhee[[llpp]]
Display a help message.
[[lliinnee]] ii[[nnsseerrtt]][[!!]]
The input text is inserted before the specified line.
[[rraannggee]] jj[[ooiinn]][[!!]] [[ccoouunntt]] [[ffllaaggss]]
Join lines of text together.
[[rraannggee]] ll[[iisstt]] [[ccoouunntt]] [[ffllaaggss]]
Display the lines unambiguously.
mmaapp[[!!]] [[llhhss rrhhss]]
Define or display maps (for vvii only).
[[lliinnee]] mmaa[[rrkk]] <<cchhaarraacctteerr>>
[[lliinnee]] kk <<cchhaarraacctteerr>>
Mark the line with the mark <character>.
[[rraannggee]] mm[[oovvee]] lliinnee
Move the specified lines after the target line.
mmkk[[eexxrrcc]][[!!]] ffiillee
Write the abbreviations, editor options and maps to the specified
file.
nn[[eexxtt]][[!!]] [[ffiillee ......]]
Edit the next file from the argument list.
[[lliinnee]] oo[[ppeenn]] //ppaatttteerrnn// [[ffllaaggss]]
Enter open mode.
pprree[[sseerrvvee]]
Save the file in a form that can later be recovered using the eexx --rr
option.
pprreevv[[iioouuss]][[!!]]
Edit the previous file from the argument list.
[[rraannggee]] pp[[rriinntt]] [[ccoouunntt]] [[ffllaaggss]]
Display the specified lines.
[[lliinnee]] ppuu[[tt]] [[bbuuffffeerr]]
Append buffer contents to the current line.
qq[[uuiitt]][[!!]]
End the editing session.
[[lliinnee]] rr[[eeaadd]][[!!]] [[ffiillee]]
Read a file.
rreecc[[oovveerr]] ffiillee
Recover file if it was previously saved.
rreess[[iizzee]] [[++||--]]ssiizzee
VVii mode only. Grow or shrink the current screen.
rreeww[[iinndd]][[!!]]
Rewind the argument list.
ssee[[tt]] [[ooppttiioonn[[==[[vvaalluuee]]]] ......]] [[nnooooppttiioonn ......]] [[ooppttiioonn?? ......]] [[aallll]]
Display or set editor options.
sshh[[eellll]]
Run a shell program.
ssoo[[uurrccee]] ffiillee
Read and execute eexx commands from a file.
[[rraannggee]] ss[[uubbssttiittuuttee]] [[//ppaatttteerrnn//rreeppllaaccee//]] [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]]
[[rraannggee]] && [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]]
[[rraannggee]] ~~ [[ooppttiioonnss]] [[ccoouunntt]] [[ffllaaggss]]
Make substitutions.
ssuu[[ssppeenndd]][[!!]]
sstt[[oopp]][[!!]]
<<ssuussppeenndd>>
Suspend the edit session.
ttaa[[gg]][[!!]] ttaaggssttrriinngg
Edit the file containing the specified tag.
ttaaggpp[[oopp]][[!!]] [[ffiillee || nnuummbbeerr]]
Pop to the specified tag in the tags stack.
uunnmm[[aapp]][[!!]] llhhss
Unmap a mapped string.
vvee[[rrssiioonn]]
Display the version of the eexx//vvii editor.
[[lliinnee]] vvii[[ssuuaall]] [[ttyyppee]] [[ccoouunntt]] [[ffllaaggss]]
EExx mode only. Enter vvii.
vvii[[ssuuaall]][[!!]] [[++ccmmdd]] [[ffiillee]]
VVii mode only. Edit a new file.
vviiuu[[ssaaggee]] [[ccoommmmaanndd]]
Display usage for a vvii command.
[[rraannggee]] ww[[rriittee]][[!!]] [[>>>>]] [[ffiillee]]
[[rraannggee]] ww[[rriittee]] [[!!]] [[ffiillee]]
[[rraannggee]] wwnn[[!!]] [[>>>>]] [[ffiillee]]
[[rraannggee]] wwqq[[!!]] [[>>>>]] [[ffiillee]]
Write the file.
[[rraannggee]] xx[[iitt]][[!!]] [[ffiillee]]
Write the file if it has been modified.
[[rraannggee]] yyaa[[nnkk]] [[bbuuffffeerr]] [[ccoouunntt]]
Copy the specified lines to a buffer.
[[lliinnee]] zz [[ttyyppee]] [[ccoouunntt]] [[ffllaaggss]]
Adjust the window.
SSEETT OOPPTTIIOONNSS
There are a large number of options that may be set (or unset) to change
the editor's behavior. This section describes the options, their abbre-
viations and their default values.
In each entry below, the first part of the tag line is the full name of
the option, followed by any equivalent abbreviations. The part in square
brackets is the default value of the option. Most of the options are
boolean, i.e. they are either on or off, and do not have an associated
value.
Options apply to both eexx and vvii modes, unless otherwise specified.
aallttwweerraassee [[ooffff]]
VVii only. Select an alternate word erase algorithm.
aauuttooiinnddeenntt,, aaii [[ooffff]]
Automatically indent new lines.
aauuttoopprriinntt,, aapp [[ooffff]]
EExx only. Display the current line automatically.
aauuttoowwrriittee,, aaww [[ooffff]]
Write modified files automatically when changing files.
bbaacckkuupp [[""""]]
Backup files before they are overwritten.
bbeeaauuttiiffyy,, bbff [[ooffff]]
Discard control characters.
ccddppaatthh [[eennvviirroonnmmeenntt vvaarriiaabbllee CCDDPPAATTHH,, oorr ccuurrrreenntt ddiirreeccttoorryy]]
The directory paths used as path prefixes for the ccdd command.
ccoolluummnnss,, ccoo [[8800]]
Set the number of columns in the screen.
ccoommmmeenntt [[ooffff]]
VVii only. Skip leading comments in files.
ddiirreeccttoorryy,, ddiirr [[eennvviirroonnmmeenntt vvaarriiaabbllee TTMMPPDDIIRR,, oorr //ttmmpp]]
The directory where temporary files are created.
eeddccoommppaattiibbllee,, eedd [[ooffff]]
Remember the values of the ``c'' and ``g'' suffices to the
ssuubbssttiittuuttee commands, instead of initializing them as unset for each
new command.
eerrrroorrbbeellllss,, eebb [[ooffff]]
EExx only. Announce error messages with a bell.
eexxrrcc,, eexx [[ooffff]]
Never read startup files in the local directory.
eexxtteennddeedd [[ooffff]]
Regular expressions are extended (i.e. egrep(1) style) expres-
sions.
ffiilleecc [[ooffff]]
Cause the <tab> character to perform file path completion on the
colon command line.
ffllaasshh [[oonn]]
Flash the screen instead of beeping the keyboard on error.
hhaarrddttaabbss,, hhtt [[88]]
Set the spacing between hardware tab settings.
iiggnnoorreeccaassee,, iicc [[ooffff]]
Ignore case differences in regular expressions.
kkeeyyttiimmee [[66]]
The 10th's of a second eexx//vvii waits for a subsequent key to complete
a key mapping.
lleeffttrriigghhtt [[ooffff]]
VVii only. Do left-right scrolling.
lliinneess,, llii [[2244]]
VVii only. Set the number of lines in the screen.
lliisspp [[ooffff]]
VVii only. Modify various search commands and options to work with
Lisp.
_T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_.
lliisstt [[ooffff]]
Display lines in an unambiguous fashion.
lloocckk [[oonn]]
Attempt to get an exclusive lock on any file being edited, read or
written.
mmaaggiicc [[oonn]]
Treat certain characters specially in regular expressions.
mmaattcchhttiimmee [[77]]
VVii only. The 10th's of a second eexx//vvii pauses on the matching char-
acter when the sshhoowwmmaattcchh option is set.
mmeessgg [[oonn]]
Permit messages from other users.
mmooddeelliinneess,, mmooddeelliinnee [[ooffff]]
Read the first and last few lines of each file for eexx commands.
_T_h_i_s _o_p_t_i_o_n _w_i_l_l _n_e_v_e_r _b_e _i_m_p_l_e_m_e_n_t_e_d_.
nnoopprriinntt [[""""]]
Characters that are never handled as printable characters.
nnuummbbeerr,, nnuu [[ooffff]]
Precede each line displayed with its current line number.
ooccttaall [[ooffff]]
Display unknown characters as octal numbers, instead of the default
hexadecimal.
ooppeenn [[oonn]]
EExx only. If this option is not set, the ooppeenn and vviissuuaall commands
are disallowed.
ooppttiimmiizzee,, oopptt [[oonn]]
VVii only. Optimize text throughput to dumb terminals.
_T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_.
ppaarraaggrraapphhss,, ppaarraa [[IIPPLLPPPPPPQQPPPP LLIIppppllppiippbbpp]]
VVii only. Define additional paragraph boundaries for the {{ and }}
commands.
pprriinntt [[""""]]
Characters that are always handled as printable characters.
pprroommpptt [[oonn]]
EExx only. Display a command prompt.
rreeaaddoonnllyy,, rroo [[ooffff]]
Mark the file as read-only.
rreeccddiirr [[//vvaarr//ttmmpp//vvii..rreeccoovveerr]]
The directory where recovery files are stored.
rreeddrraaww,, rree [[ooffff]]
VVii only. Simulate an intelligent terminal on a dumb one.
_T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_.
rreemmaapp [[oonn]]
Remap keys until resolved.
rreeppoorrtt [[55]]
Set the number of lines about which the editor reports changes or
yanks.
rruulleerr [[ooffff]]
VVii only. Display a row/column ruler on the colon command line.
ssccrroollll,, ssccrr [[wwiinnddooww // 22]]
Set the number of lines scrolled.
sseeccttiioonnss,, sseecctt [[NNHHSSHHHH HHUUnnhhsshh]]
VVii only. Define additional section boundaries for the [[[[ and ]]]]
commands.
sshheellll,, sshh [[eennvviirroonnmmeenntt vvaarriiaabbllee SSHHEELLLL,, oorr //bbiinn//sshh]]
Select the shell used by the editor.
sshheellllmmeettaa [[~~{{[[**??$$``''""\\]]
Set the meta characters checked to determine if file name expansion
is necessary.
sshhiiffttwwiiddtthh,, ssww [[88]]
Set the autoindent and shift command indentation width.
sshhoowwmmaattcchh,, ssmm [[ooffff]]
VVii only. Note matching ``{'' and ``('' for ``}'' and ``)'' charac-
ters.
sshhoowwmmooddee [[ooffff]]
VVii only. Display the current editor mode and a ``modified'' flag.
ssiiddeessccrroollll [[1166]]
VVii only. Set the amount a left-right scroll will shift.
sslloowwooppeenn,, ssllooww [[ooffff]]
Delay display updating during text input.
_T_h_i_s _o_p_t_i_o_n _i_s _n_o_t _y_e_t _i_m_p_l_e_m_e_n_t_e_d_.
ssoouurrcceeaannyy [[ooffff]]
Read startup files not owned by the current user.
_T_h_i_s _o_p_t_i_o_n _w_i_l_l _n_e_v_e_r _b_e _i_m_p_l_e_m_e_n_t_e_d_.
ttaabbssttoopp,, ttss [[88]]
This option sets tab widths for the editor display.
ttaagglleennggtthh,, ttll [[00]]
Set the number of significant characters in tag names.
ttaaggss,, ttaagg [[ttaaggss //vvaarr//ddbb//lliibbcc..ttaaggss //ssyyss//kkeerrnn//ttaaggss]]
Set the list of tags files.
tteerrmm,, ttttyyttyyppee,, ttttyy [[eennvviirroonnmmeenntt vvaarriiaabbllee TTEERRMM]]
Set the terminal type.
tteerrssee [[ooffff]]
This option has historically made editor messages less verbose. It
has no effect in this implementation.
ttiillddeeoopp
Modify the ~~ command to take an associated motion.
ttiimmeeoouutt,, ttoo [[oonn]]
Time out on keys which may be mapped.
ttttyywweerraassee [[ooffff]]
VVii only. Select an alternate erase algorithm.
vveerrbboossee [[ooffff]]
only. Display an error message for every error.
ww330000 [[nnoo ddeeffaauulltt]]
VVii only. Set the window size if the baud rate is less than 1200
baud.
ww11220000 [[nnoo ddeeffaauulltt]]
VVii only. Set the window size if the baud rate is equal to 1200
baud.
ww99660000 [[nnoo ddeeffaauulltt]]
VVii only. Set the window size if the baud rate is greater than 1200
baud.
wwaarrnn [[oonn]]
EExx only. This option causes a warning message to the terminal if
the file has been modified, since it was last written, before a !!
command.
wwiinnddooww,, ww,, wwii [[eennvviirroonnmmeenntt vvaarriiaabbllee LLIINNEESS]]
Set the window size for the screen.
wwrraapplleenn,, wwll [[00]]
VVii only. Break lines automatically, the specified number of
columns from the left-hand margin.
wwrraappmmaarrggiinn,, wwmm [[00]]
VVii only. Break lines automatically, the specified number of
columns from the right-hand margin.
wwrraappssccaann,, wwss [[oonn]]
Set searches to wrap around the end or beginning of the file.
wwrriitteeaannyy,, wwaa [[ooffff]]
Turn off file-overwriting checks.
EENNVVIIRROONNMMEENNTTAALL VVAARRIIAABBLLEESS
COLUMNS The number of columns on the screen. This value overrides any
system or terminal specific values. If the COLUMNS environ-
mental variable is not set when eexx//vvii runs, or the ccoolluummnnss op-
tion is explicitly reset by the user, eexx//vvii enters the value
into the environment.
EXINIT A list of eexx startup commands, read if the variable NEXINIT is
not set.
HOME The user's home directory, used as the initial directory path
for the startup _$_H_O_M_E_/_._n_e_x_r_c and _$_H_O_M_E_/_._e_x_r_c files. This val-
ue is also used as the default directory for the vvii ccdd com-
mand.
LINES The number of rows on the screen. This value overrides any
system or terminal specific values. If the LINES environmen-
tal variable is not set when eexx//vvii runs, or the lliinneess option
is explicitly reset by the user, eexx//vvii enters the value into
the environment.
NEXINIT A list of eexx startup commands.
SHELL The user's shell of choice (see also the sshheellll option).
TERM The user's terminal type. The default is the type
``unknown''. If the TERM environmental variable is not set
when eexx//vvii runs, or the tteerrmm option is explicitly reset by the
user, eexx//vvii enters the value into the environment.
TMPDIR The location used to stored temporary files (see also the
ddiirreeccttoorryy option).
AASSYYNNCCHHRROONNOOUUSS EEVVEENNTTSS
SIGALRM VVii//eexx uses this signal for periodic backups of file modifica-
tions and to display ``busy'' messages when operations are
likely to take a long time.
SIGHUP
SIGTERM If the current buffer has changed since it was last written
in its entirety, the editor attempts to save the modified
file so it can be later recovered. See the vvii//eexx Reference
manual section entitled ``Recovery'' for more information.
SIGINT When an interrupt occurs, the current operation is halted,
and the editor returns to the command level. If interrupted
during text input, the text already input is resolved into
the file as if the text input had been normally terminated.
SIGWINCH The screen is resized. See the vvii//eexx Reference manual sec-
tion entitled ``Sizing the Screen'' for more information.
SIGCONT
SIGQUIT
SIGTSTP VVii//eexx ignores these signals.
BBUUGGSS
See the file _n_v_i_/_d_o_c_s_/_b_u_g_s_._c_u_r_r_e_n_t for a list of the known bugs in this
version.
FFIILLEESS
/bin/sh The default user shell.
/etc/vi.exrc System-wide vi startup file.
/tmp Temporary file directory.
/var/tmp/vi.recover The default recovery file directory.
$HOME/.nexrc 1st choice for user's home directory startup file.
$HOME/.exrc 2nd choice for user's home directory startup file.
.nexrc 1st choice for local directory startup file.
.exrc 2nd choice for local directory startup file.
SSEEEE AALLSSOO
ctags(1), more(1), curses(3), dbopen(3)
The ``Vi Quick Reference'' card.
``An Introduction to Display Editing with Vi'', found in the ``UNIX
User's Manual Supplementary Documents'' section of both the 4.3BSD and
4.4BSD manual sets. This document is the closest thing available to an
introduction to the vvii screen editor.
``Ex Reference Manual (Version 3.7)'', found in the ``UNIX User's Manual
Supplementary Documents'' section of both the 4.3BSD and 4.4BSD manual
sets. This document is the final reference for the eexx editor, as dis-
tributed in most historic 4BSD and System V systems.
``Edit: A tutorial'', found in the ``UNIX User's Manual Supplementary
Documents'' section of the 4.3BSD manual set. This document is an intro-
duction to a simple version of the eexx screen editor.
``Ex/Vi Reference Manual'', found in the ``UNIX User's Manual
Supplementary Documents'' section of the 4.4BSD manual set. This docu-
ment is the final reference for the nneexx//nnvvii text editors, as distributed
in 4.4BSD and 4.4BSD-Lite.
RRooffff source for all of these documents is distributed with nneexx//nnvvii in the
_n_v_i_/_U_S_D_._d_o_c directory of the nneexx//nnvvii source code.
The files ``autowrite'', ``input'', ``quoting'', and ``structures'',
found in the _n_v_i_/_d_o_c_s_/_i_n_t_e_r_n_a_l_s directory of the nneexx//nnvvii source code.
HHIISSTTOORRYY
The nneexx//nnvvii replacements for the eexx//vvii editor first appeared in 4.4BSD.
SSTTAANNDDAARRDDSS
NNeexx//nnvvii is close to IEEE Std1003.2 (``POSIX''). That document differs
from historical eexx//vvii practice in several places; there are changes to be
made on both sides.
BSDI BSD/OS December 1, 1995 13